<?php
$mode = $_POST['mode'];
include ("conn.php");
if($mode=="1"){
	$skey = $_POST['skey'];
	//验证skey是否存在
	$sql="SELECT * FROM user WHERE thirdSession='".$skey."'";
	$result = $conn->query($sql);
	if ($result->num_rows == 0) {exit('{"code":450}');}
	$row = $result->fetch_assoc();
	$uid = (int)$row['id'];
}else if($mode=="2"){
	$uid = (int)$_POST['uid'];
}
include ("findUser.php");

$userInfo = findUser($uid);
//array_splice($userInfo,0,1);
echo json_encode($userInfo);
?>